package io.rocketman.transport.server;

import io.rocketman.transport.channel.Channel;
import io.rocketman.transport.channel.handler.ChannelHandler;

import java.net.InetSocketAddress;
import java.util.List;

/**
 * @author He Peng
 * @create 2018-05-25 2:15
 * @update 2018-05-25 2:15
 * @updatedesc : 更新说明
 * @see
 */
public abstract class AbstractServer implements Server {

    protected ChannelHandler channelHandler;

    public AbstractServer(InetSocketAddress localAddress) {
        try {
            start(localAddress);
        } catch (Exception e) {
            throw new OpenServerException();
        }
    }

    @Override
    public List<Channel> getOpenedChannels() {
        return null;
    }


    @Override
    public Channel selectChannel(InetSocketAddress remoteAddress) {
        return null;
    }
}
